# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
pkgname=py3-django-rest-framework
_pkgname=django-rest-framework
pkgver=3.11.1
pkgrel=0
pkgdesc="Web APIs for Django"
options="!check" # fails with "OperationalError: no such table: auth_user"
url="https://github.com/encode/django-rest-framework"
arch="noarch"
license="Custom"
depends="py3-django"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-tz py3-core-api py3-jinja2 py3-uritemplate"
source="$pkgname-$pkgver.tar.gz::https://github.com/encode/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python3 setup.py --quiet build
}

check() {
	python3 runtests.py
}

package() {
	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}

sha512sums="36382146164d1ab1284adb55a46ec2114b27d22d9a6de57d6b1789ae0295399d6be1cfa0e1f7047f866ba6c815e210efd6c8c13170ffa8040ad016f9835d932a  py3-django-rest-framework-3.11.1.tar.gz"
